package com.pgybook.db.entity.domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class BookInOrderHistoryEx {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public BookInOrderHistoryEx() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andBookinorderhistoryidIsNull() {
            addCriterion("BOOKINORDERHISTORYID is null");
            return (Criteria) this;
        }

        public Criteria andBookinorderhistoryidIsNotNull() {
            addCriterion("BOOKINORDERHISTORYID is not null");
            return (Criteria) this;
        }

        public Criteria andBookinorderhistoryidEqualTo(Long value) {
            addCriterion("BOOKINORDERHISTORYID =", value, "bookinorderhistoryid");
            return (Criteria) this;
        }

        public Criteria andBookinorderhistoryidNotEqualTo(Long value) {
            addCriterion("BOOKINORDERHISTORYID <>", value, "bookinorderhistoryid");
            return (Criteria) this;
        }

        public Criteria andBookinorderhistoryidGreaterThan(Long value) {
            addCriterion("BOOKINORDERHISTORYID >", value, "bookinorderhistoryid");
            return (Criteria) this;
        }

        public Criteria andBookinorderhistoryidGreaterThanOrEqualTo(Long value) {
            addCriterion("BOOKINORDERHISTORYID >=", value, "bookinorderhistoryid");
            return (Criteria) this;
        }

        public Criteria andBookinorderhistoryidLessThan(Long value) {
            addCriterion("BOOKINORDERHISTORYID <", value, "bookinorderhistoryid");
            return (Criteria) this;
        }

        public Criteria andBookinorderhistoryidLessThanOrEqualTo(Long value) {
            addCriterion("BOOKINORDERHISTORYID <=", value, "bookinorderhistoryid");
            return (Criteria) this;
        }

        public Criteria andBookinorderhistoryidIn(List<Long> values) {
            addCriterion("BOOKINORDERHISTORYID in", values, "bookinorderhistoryid");
            return (Criteria) this;
        }

        public Criteria andBookinorderhistoryidNotIn(List<Long> values) {
            addCriterion("BOOKINORDERHISTORYID not in", values, "bookinorderhistoryid");
            return (Criteria) this;
        }

        public Criteria andBookinorderhistoryidBetween(Long value1, Long value2) {
            addCriterion("BOOKINORDERHISTORYID between", value1, value2, "bookinorderhistoryid");
            return (Criteria) this;
        }

        public Criteria andBookinorderhistoryidNotBetween(Long value1, Long value2) {
            addCriterion("BOOKINORDERHISTORYID not between", value1, value2, "bookinorderhistoryid");
            return (Criteria) this;
        }

        public Criteria andBookinorderidIsNull() {
            addCriterion("BOOKINORDERID is null");
            return (Criteria) this;
        }

        public Criteria andBookinorderidIsNotNull() {
            addCriterion("BOOKINORDERID is not null");
            return (Criteria) this;
        }

        public Criteria andBookinorderidEqualTo(Long value) {
            addCriterion("BOOKINORDERID =", value, "bookinorderid");
            return (Criteria) this;
        }

        public Criteria andBookinorderidNotEqualTo(Long value) {
            addCriterion("BOOKINORDERID <>", value, "bookinorderid");
            return (Criteria) this;
        }

        public Criteria andBookinorderidGreaterThan(Long value) {
            addCriterion("BOOKINORDERID >", value, "bookinorderid");
            return (Criteria) this;
        }

        public Criteria andBookinorderidGreaterThanOrEqualTo(Long value) {
            addCriterion("BOOKINORDERID >=", value, "bookinorderid");
            return (Criteria) this;
        }

        public Criteria andBookinorderidLessThan(Long value) {
            addCriterion("BOOKINORDERID <", value, "bookinorderid");
            return (Criteria) this;
        }

        public Criteria andBookinorderidLessThanOrEqualTo(Long value) {
            addCriterion("BOOKINORDERID <=", value, "bookinorderid");
            return (Criteria) this;
        }

        public Criteria andBookinorderidIn(List<Long> values) {
            addCriterion("BOOKINORDERID in", values, "bookinorderid");
            return (Criteria) this;
        }

        public Criteria andBookinorderidNotIn(List<Long> values) {
            addCriterion("BOOKINORDERID not in", values, "bookinorderid");
            return (Criteria) this;
        }

        public Criteria andBookinorderidBetween(Long value1, Long value2) {
            addCriterion("BOOKINORDERID between", value1, value2, "bookinorderid");
            return (Criteria) this;
        }

        public Criteria andBookinorderidNotBetween(Long value1, Long value2) {
            addCriterion("BOOKINORDERID not between", value1, value2, "bookinorderid");
            return (Criteria) this;
        }

        public Criteria andInstanceidIsNull() {
            addCriterion("INSTANCEID is null");
            return (Criteria) this;
        }

        public Criteria andInstanceidIsNotNull() {
            addCriterion("INSTANCEID is not null");
            return (Criteria) this;
        }

        public Criteria andInstanceidEqualTo(Long value) {
            addCriterion("INSTANCEID =", value, "instanceid");
            return (Criteria) this;
        }

        public Criteria andInstanceidNotEqualTo(Long value) {
            addCriterion("INSTANCEID <>", value, "instanceid");
            return (Criteria) this;
        }

        public Criteria andInstanceidGreaterThan(Long value) {
            addCriterion("INSTANCEID >", value, "instanceid");
            return (Criteria) this;
        }

        public Criteria andInstanceidGreaterThanOrEqualTo(Long value) {
            addCriterion("INSTANCEID >=", value, "instanceid");
            return (Criteria) this;
        }

        public Criteria andInstanceidLessThan(Long value) {
            addCriterion("INSTANCEID <", value, "instanceid");
            return (Criteria) this;
        }

        public Criteria andInstanceidLessThanOrEqualTo(Long value) {
            addCriterion("INSTANCEID <=", value, "instanceid");
            return (Criteria) this;
        }

        public Criteria andInstanceidIn(List<Long> values) {
            addCriterion("INSTANCEID in", values, "instanceid");
            return (Criteria) this;
        }

        public Criteria andInstanceidNotIn(List<Long> values) {
            addCriterion("INSTANCEID not in", values, "instanceid");
            return (Criteria) this;
        }

        public Criteria andInstanceidBetween(Long value1, Long value2) {
            addCriterion("INSTANCEID between", value1, value2, "instanceid");
            return (Criteria) this;
        }

        public Criteria andInstanceidNotBetween(Long value1, Long value2) {
            addCriterion("INSTANCEID not between", value1, value2, "instanceid");
            return (Criteria) this;
        }

        public Criteria andSrcstatusIsNull() {
            addCriterion("SRCSTATUS is null");
            return (Criteria) this;
        }

        public Criteria andSrcstatusIsNotNull() {
            addCriterion("SRCSTATUS is not null");
            return (Criteria) this;
        }

        public Criteria andSrcstatusEqualTo(Integer value) {
            addCriterion("SRCSTATUS =", value, "srcstatus");
            return (Criteria) this;
        }

        public Criteria andSrcstatusNotEqualTo(Integer value) {
            addCriterion("SRCSTATUS <>", value, "srcstatus");
            return (Criteria) this;
        }

        public Criteria andSrcstatusGreaterThan(Integer value) {
            addCriterion("SRCSTATUS >", value, "srcstatus");
            return (Criteria) this;
        }

        public Criteria andSrcstatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("SRCSTATUS >=", value, "srcstatus");
            return (Criteria) this;
        }

        public Criteria andSrcstatusLessThan(Integer value) {
            addCriterion("SRCSTATUS <", value, "srcstatus");
            return (Criteria) this;
        }

        public Criteria andSrcstatusLessThanOrEqualTo(Integer value) {
            addCriterion("SRCSTATUS <=", value, "srcstatus");
            return (Criteria) this;
        }

        public Criteria andSrcstatusIn(List<Integer> values) {
            addCriterion("SRCSTATUS in", values, "srcstatus");
            return (Criteria) this;
        }

        public Criteria andSrcstatusNotIn(List<Integer> values) {
            addCriterion("SRCSTATUS not in", values, "srcstatus");
            return (Criteria) this;
        }

        public Criteria andSrcstatusBetween(Integer value1, Integer value2) {
            addCriterion("SRCSTATUS between", value1, value2, "srcstatus");
            return (Criteria) this;
        }

        public Criteria andSrcstatusNotBetween(Integer value1, Integer value2) {
            addCriterion("SRCSTATUS not between", value1, value2, "srcstatus");
            return (Criteria) this;
        }

        public Criteria andDststatusIsNull() {
            addCriterion("DSTSTATUS is null");
            return (Criteria) this;
        }

        public Criteria andDststatusIsNotNull() {
            addCriterion("DSTSTATUS is not null");
            return (Criteria) this;
        }

        public Criteria andDststatusEqualTo(Integer value) {
            addCriterion("DSTSTATUS =", value, "dststatus");
            return (Criteria) this;
        }

        public Criteria andDststatusNotEqualTo(Integer value) {
            addCriterion("DSTSTATUS <>", value, "dststatus");
            return (Criteria) this;
        }

        public Criteria andDststatusGreaterThan(Integer value) {
            addCriterion("DSTSTATUS >", value, "dststatus");
            return (Criteria) this;
        }

        public Criteria andDststatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("DSTSTATUS >=", value, "dststatus");
            return (Criteria) this;
        }

        public Criteria andDststatusLessThan(Integer value) {
            addCriterion("DSTSTATUS <", value, "dststatus");
            return (Criteria) this;
        }

        public Criteria andDststatusLessThanOrEqualTo(Integer value) {
            addCriterion("DSTSTATUS <=", value, "dststatus");
            return (Criteria) this;
        }

        public Criteria andDststatusIn(List<Integer> values) {
            addCriterion("DSTSTATUS in", values, "dststatus");
            return (Criteria) this;
        }

        public Criteria andDststatusNotIn(List<Integer> values) {
            addCriterion("DSTSTATUS not in", values, "dststatus");
            return (Criteria) this;
        }

        public Criteria andDststatusBetween(Integer value1, Integer value2) {
            addCriterion("DSTSTATUS between", value1, value2, "dststatus");
            return (Criteria) this;
        }

        public Criteria andDststatusNotBetween(Integer value1, Integer value2) {
            addCriterion("DSTSTATUS not between", value1, value2, "dststatus");
            return (Criteria) this;
        }

        public Criteria andCrttimeIsNull() {
            addCriterion("CRTTIME is null");
            return (Criteria) this;
        }

        public Criteria andCrttimeIsNotNull() {
            addCriterion("CRTTIME is not null");
            return (Criteria) this;
        }

        public Criteria andCrttimeEqualTo(Date value) {
            addCriterion("CRTTIME =", value, "crttime");
            return (Criteria) this;
        }

        public Criteria andCrttimeNotEqualTo(Date value) {
            addCriterion("CRTTIME <>", value, "crttime");
            return (Criteria) this;
        }

        public Criteria andCrttimeGreaterThan(Date value) {
            addCriterion("CRTTIME >", value, "crttime");
            return (Criteria) this;
        }

        public Criteria andCrttimeGreaterThanOrEqualTo(Date value) {
            addCriterion("CRTTIME >=", value, "crttime");
            return (Criteria) this;
        }

        public Criteria andCrttimeLessThan(Date value) {
            addCriterion("CRTTIME <", value, "crttime");
            return (Criteria) this;
        }

        public Criteria andCrttimeLessThanOrEqualTo(Date value) {
            addCriterion("CRTTIME <=", value, "crttime");
            return (Criteria) this;
        }

        public Criteria andCrttimeIn(List<Date> values) {
            addCriterion("CRTTIME in", values, "crttime");
            return (Criteria) this;
        }

        public Criteria andCrttimeNotIn(List<Date> values) {
            addCriterion("CRTTIME not in", values, "crttime");
            return (Criteria) this;
        }

        public Criteria andCrttimeBetween(Date value1, Date value2) {
            addCriterion("CRTTIME between", value1, value2, "crttime");
            return (Criteria) this;
        }

        public Criteria andCrttimeNotBetween(Date value1, Date value2) {
            addCriterion("CRTTIME not between", value1, value2, "crttime");
            return (Criteria) this;
        }

        public Criteria andCrtstaffIsNull() {
            addCriterion("CRTSTAFF is null");
            return (Criteria) this;
        }

        public Criteria andCrtstaffIsNotNull() {
            addCriterion("CRTSTAFF is not null");
            return (Criteria) this;
        }

        public Criteria andCrtstaffEqualTo(Integer value) {
            addCriterion("CRTSTAFF =", value, "crtstaff");
            return (Criteria) this;
        }

        public Criteria andCrtstaffNotEqualTo(Integer value) {
            addCriterion("CRTSTAFF <>", value, "crtstaff");
            return (Criteria) this;
        }

        public Criteria andCrtstaffGreaterThan(Integer value) {
            addCriterion("CRTSTAFF >", value, "crtstaff");
            return (Criteria) this;
        }

        public Criteria andCrtstaffGreaterThanOrEqualTo(Integer value) {
            addCriterion("CRTSTAFF >=", value, "crtstaff");
            return (Criteria) this;
        }

        public Criteria andCrtstaffLessThan(Integer value) {
            addCriterion("CRTSTAFF <", value, "crtstaff");
            return (Criteria) this;
        }

        public Criteria andCrtstaffLessThanOrEqualTo(Integer value) {
            addCriterion("CRTSTAFF <=", value, "crtstaff");
            return (Criteria) this;
        }

        public Criteria andCrtstaffIn(List<Integer> values) {
            addCriterion("CRTSTAFF in", values, "crtstaff");
            return (Criteria) this;
        }

        public Criteria andCrtstaffNotIn(List<Integer> values) {
            addCriterion("CRTSTAFF not in", values, "crtstaff");
            return (Criteria) this;
        }

        public Criteria andCrtstaffBetween(Integer value1, Integer value2) {
            addCriterion("CRTSTAFF between", value1, value2, "crtstaff");
            return (Criteria) this;
        }

        public Criteria andCrtstaffNotBetween(Integer value1, Integer value2) {
            addCriterion("CRTSTAFF not between", value1, value2, "crtstaff");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}